# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AndroidEnterprise.V1.Model.ProductsApproveRequest do
  @moduledoc """


  ## Attributes

  *   `approvalUrlInfo` (*type:* `GoogleApi.AndroidEnterprise.V1.Model.ApprovalUrlInfo.t`, *default:* `nil`) - The approval URL that was shown to the user. Only the permissions shown to the user with that URL will be accepted, which may not be the product's entire set of permissions. For example, the URL may only display new permissions from an update after the product was approved, or not include new permissions if the product was updated since the URL was generated.
  *   `approvedPermissions` (*type:* `String.t`, *default:* `nil`) - Sets how new permission requests for the product are handled. "allPermissions" automatically approves all current and future permissions for the product. "currentPermissionsOnly" approves the current set of permissions for the product, but any future permissions added through updates will require manual reapproval. If not specified, only the current set of permissions will be approved.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :approvalUrlInfo => GoogleApi.AndroidEnterprise.V1.Model.ApprovalUrlInfo.t() | nil,
          :approvedPermissions => String.t() | nil
        }

  field(:approvalUrlInfo, as: GoogleApi.AndroidEnterprise.V1.Model.ApprovalUrlInfo)
  field(:approvedPermissions)
end

defimpl Poison.Decoder, for: GoogleApi.AndroidEnterprise.V1.Model.ProductsApproveRequest do
  def decode(value, options) do
    GoogleApi.AndroidEnterprise.V1.Model.ProductsApproveRequest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.AndroidEnterprise.V1.Model.ProductsApproveRequest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
